/*
 * Other.c
 *
 *  Created on: Jun 10, 2024
 *      Author: Liangmiyi
 */
#include <MY_INC/PHY/PHY_PQ.h>
static inline void PQ_Process_Reset_Inline(PQ_Typedef *PQ);
void               PQ_Process_Init(PQ_Typedef *PQ, float coefficient)
{
    if (PQ == NULL)
        return; // 检查指针是否为 NULL
    PQ->coefficient = coefficient;
    PQ_Process_Reset_Inline(PQ); // 重置PQ结构体
}
void PQ_Process_Reset(PQ_Typedef *PQ)
{
    if (PQ == NULL)
        return;
    PQ_Process_Reset_Inline(PQ); // 重置PQ结构体
}
static inline void PQ_Process_Reset_Inline(PQ_Typedef *PQ)
{
    PQ->Pe_Actual = 0.0f;
    PQ->Qe_Actual = 0.0f;
    PQ->Pe_Disp = 0.0f;
    PQ->Qe_Disp = 0.0f;
    PQ->PF = 0.0f; // PF值
    PQ->Ud = 0.0f;
    PQ->Uq = 0.0f;
    PQ->Id = 0.0f;
    PQ->Iq = 0.0f;
}
